home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / Aztec C v5.2a disk 4.adf / 204inc_h.lzh / devices / timer.h < prev    next >
C/C++ Source or Header  |  1991-03-14  |  896b  |  48 lines

  1. #ifndef DEVICES_TIMER_H
  2. #define DEVICES_TIMER_H 1
  3. /*
  4. **    $Filename: devices/timer.h $
  5. **    $Release: 2.04 $
  6. **    $Revision: 36.16 $
  7. **    $Date: 91/01/25 $
  8. **
  9. **    Timer device name and useful definitions.
  10. **
  11. **    (C) Copyright 1985,1985,1987,1988,1989,1990 Commodore-Amiga Inc.
  12. **        All Rights Reserved
  13. */
  14.  
  15. #include <exec/types.h>
  16. #include <exec/io.h>
  17.  
  18. /* unit defintions */
  19. #define UNIT_MICROHZ    0
  20. #define UNIT_VBLANK    1
  21. #define UNIT_ECLOCK    2
  22. #define UNIT_WAITUNTIL    3
  23. #define    UNIT_WAITECLOCK    4
  24.  
  25. #define TIMERNAME    "timer.device"
  26.  
  27. struct timeval {
  28.     ULONG tv_secs;
  29.     ULONG tv_micro;
  30. };
  31.  
  32. struct EClockVal {
  33.     ULONG ev_hi;
  34.     ULONG ev_lo;
  35. };
  36.  
  37. struct timerequest {
  38.     struct IORequest tr_node;
  39.     struct timeval tr_time;
  40. };
  41.  
  42. /* IO_COMMAND to use for adding a timer */
  43. #define TR_ADDREQUEST    CMD_NONSTD
  44. #define TR_GETSYSTIME    (CMD_NONSTD+1)
  45. #define TR_SETSYSTIME    (CMD_NONSTD+2)
  46.  
  47. #endif /* DEVICES_TIMER_H */
  48.